import {createRouter,createWebHashHistory} from 'vue-router';
import Home from '../components/Home.vue'
import List from '../components/List.vue'
import Add from '../components/Add.vue'
import Update from '../components/Update.vue'
const router= createRouter({
    history: createWebHashHistory(),
    routes:[
        {
            path: '/',
            components:{
                default:Home,
                'home':Home
            }
        },
        {
            path: '/list',
            components:{
                'list':List
            }
        },
        {
            path: '/add',
            component:Add
        },
        {
            path: '/update',
            component:Update,
        },
        {
            path:'/showAll',
            redirect:'/list'
        }
    ]
});

export default router;